<template>
  <div>
    <!--<bread-crumb :one="'系统管理'" :two="'菜单导航'"></bread-crumb>-->
    <el-form :inline="true" :model="formData">
      <el-form-item label="项目名称：">
        <el-input icon="search"  :on-icon-click="handleIconClick">
        </el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="search" @click="handleSearch()">搜索</el-button>
      </el-form-item>
    </el-form>
    <datagrid :config="dataGrid">
    </datagrid>
  </div>
</template>
<script>
//  import BreadCrumb from "@/components/BreadCrumb.vue";
import Datagrid from "@/components/EasyuiDatagrid.vue";
import { easyui } from "@/core";
import utils from "@/utils";

export default {
  components: {
    //      BreadCrumb,
    Datagrid
  },
  mixins: [easyui],
  data() {
    return {
      API: {
        query: "/privilege/menus",
        del: "/gafe/del_server",
        saveAll: "/gafe/saveAll"
      },
      formData: {
        name: ""
      },
      toolbar: [

      ],
      dataGrid: {
        id: "#editDataGrid",
        edit: true,
        url: "./static/datagrid_data1.json",
        fitColumns: true,
        pagination: true,
        columns: [
          [
            { field: "itemid", title: "编号", align: "center", halign: "center", width: 100 },
            {
              field: "productid",
              title: "项目名称",
              align: "center",
              halign: "center",
              width: 100,
              formatter: function(value, row) {
                return row.productname;
              },
              editor: {
                type: 'combobox',
                options: {
                  valueField: 'productid',
                  textField: 'productname',
                  method: 'get',
                  url: './static/products.json',
                  required: true
                }
              }
            },
            { field: "listprice", title: "剂型",width:50, align: "center", editor: { type: "numberbox", options: { precision: 1 } } },
            { field: "unitcost", title: "规格",width:100, align: "center", width: 50, editor: "numberbox" },
            { field: "unit", title: "单位", align: "center", width: 50, editor: "numberbox" },
            { field: "unitcost", title: "单价", align: "center", width: 50, editor: { type: "checkbox", options: { on: "P", off: "" } } },
            { field: "status", title: "基本药品分类", width:50, align: "center", editor: { type: "numberbox", options: { precision: 1 } }},
            { field: "status", title: "是否医保项目",width:50, align: "center", editor: { type: "numberbox", options: { precision: 1 } }},
            { field: "status", title: "是否非处方药", width:50, align: "center", editor: { type: "numberbox", options: { precision: 1 } }},
            { field: "status", title: "操作", width:50, align: "center", editor: { type: "numberbox", options: { precision: 1 } } }
          ]
        ]
      }
    }
  }
}

</script>
<style scoped lang="scss">


</style>
